package edu.gatech.oad.OTConfig;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class TrailImageDisplay extends JPanel {
	private Image wagonImg, atIndependence, toKansasRiver, atKansasRiver,toBigBlueRiver, atBigBlueRiver,toFortKearney, atFortKearney,
	toChimneyRock, atChimneyRock, toFortLaramie, atFortLaramie, toIndependenceRock, atIndependenceRock,
	toSouthPass, atSouthPass, toSodaSprings, atSodaSprings, toFortHall, atFortHall, toSnakeRiverCrossing, atSnakeRiverCrossing,
	toFortBoise, atFortBoise, toBlueMountains, atBlueMountains, toFortWallaWalla, atFortWallaWalla,
	toFortVancouver, atFortVancouver, toOregonCity, atOregonCity, riverCrossing;
	
	Image imageToPaint;
	ImageIcon icon;
	Image temp;
	BufferedImage image;
	Image[] imageHolder = new Image[33];

	            
	
	public TrailImageDisplay(){
		

		
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\Trailimage.jpg");
	temp = icon.getImage();
	wagonImg = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);


	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress1.jpg");
	temp = icon.getImage();
	atIndependence = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress2.jpg");
	temp = icon.getImage();
	toKansasRiver = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress3.jpg");
	temp = icon.getImage();
	atKansasRiver = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress4.jpg");
	temp = icon.getImage();
	toBigBlueRiver = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress5.jpg");
	temp = icon.getImage();
	atBigBlueRiver = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress6.jpg");
	temp = icon.getImage();
	toFortKearney = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress7.jpg");
	temp = icon.getImage();
	atFortKearney = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress8.jpg");
	temp = icon.getImage();
	toChimneyRock = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress9.jpg");
	temp = icon.getImage();
	atChimneyRock = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress10.jpg");
	temp = icon.getImage();
	toFortLaramie = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress11.jpg");
	temp = icon.getImage();
	atFortLaramie = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress12.jpg");
	temp = icon.getImage();
	toIndependenceRock = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress13.jpg");
	temp = icon.getImage();
	atIndependenceRock = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress14.jpg");
	temp = icon.getImage();
	toSouthPass = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress15.jpg");
	temp = icon.getImage();
	atSouthPass = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress16.jpg");
	temp = icon.getImage();
	toSodaSprings = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress17.jpg");
	temp = icon.getImage();
	atSodaSprings = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress18.jpg");
	temp = icon.getImage();
	toFortHall = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress20.jpg");
	temp = icon.getImage();
	atFortHall = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress21.jpg");
	temp = icon.getImage();
	toSnakeRiverCrossing = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress22.jpg");
	temp = icon.getImage();
	atSnakeRiverCrossing = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	


	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress23.jpg");
	temp = icon.getImage();
	toFortBoise = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress24.jpg");
	temp = icon.getImage();
	atFortBoise = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress25.jpg");
	temp = icon.getImage();
	toBlueMountains = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress26.jpg");
	temp = icon.getImage();
	atBlueMountains = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	

	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress27.jpg");
	temp = icon.getImage();
	toFortWallaWalla = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress28.jpg");
	temp = icon.getImage();
	atFortWallaWalla = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress29.jpg");
	temp = icon.getImage();
	toFortVancouver = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress30.jpg");
	temp = icon.getImage();
	atFortVancouver = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress31.jpg");
	temp = icon.getImage();
	toOregonCity = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\mapProgress32.jpg");
	temp = icon.getImage();
	atOregonCity = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	icon = new ImageIcon("..\\trunk\\src\\edu\\gatech\\oad\\OTConfig\\Image\\RiverCrossing.jpg");
	temp = icon.getImage();
	riverCrossing = temp.getScaledInstance(450, 205,  java.awt.Image.SCALE_SMOOTH);
	
	
	
	
	
	imageHolder[0] = atIndependence;
	imageHolder[1] = toKansasRiver;
	imageHolder[2] = atKansasRiver;
	imageHolder[3] = toBigBlueRiver;
	imageHolder[4] = atBigBlueRiver;
	imageHolder[5] = toFortKearney;
	imageHolder[6] = atFortKearney;
	imageHolder[7] = toChimneyRock;
	imageHolder[8] = atChimneyRock;
	imageHolder[9] = toFortLaramie;
	imageHolder[10] = atFortLaramie;
	imageHolder[11] = toIndependenceRock;
	imageHolder[12] = atIndependenceRock;
	imageHolder[13] = toSouthPass;
	imageHolder[14] = atSouthPass;
	imageHolder[15] = toSodaSprings;
	imageHolder[16]= atSodaSprings;
	imageHolder[17] = toFortHall;
	imageHolder[18] = atFortHall;
	imageHolder[19] = toSnakeRiverCrossing;
	imageHolder[20] = atSnakeRiverCrossing;
	imageHolder[21] = toFortBoise;
	imageHolder[22] = atFortBoise;
	imageHolder[23] = toBlueMountains;
	imageHolder[24] = atBlueMountains;
	imageHolder[25] = toFortWallaWalla;
	imageHolder[26] = atFortWallaWalla;
	imageHolder[27] = toFortVancouver;
	imageHolder[28] = atFortVancouver;
	imageHolder[29] = toOregonCity;
	imageHolder[30] = atOregonCity;
	imageHolder[31] = wagonImg;
	imageHolder[32] = riverCrossing;
	
	imageToPaint = wagonImg;
	}
	
	public void changeDisplayImage(int index){
		imageToPaint = imageHolder[index];
		repaint();
	//	System.out.println("Changing display image index is "+ index);
	}
	

public void paintComponent(Graphics g)
{
	super.paintComponent(g);
	g.drawImage(imageToPaint, 0, 0, 450, 205, this);
	
}

}